Skip to content

Incorporate PR #1031: repo-scoped suborg config resolution - #1069

Merged
decyjphr merged 5 commits into
yadhav/fix-recent-issuesfrom
decyjphr-probable-dollop
Aug 20, 2026
Merged

Incorporate PR #1031: repo-scoped suborg config resolution#1069
decyjphr merged 5 commits into
yadhav/fix-recent-issuesfrom
decyjphr-probable-dollop

Conversation

@decyjphr

Copy link
Copy Markdown
Collaborator

Incorporates #1031 (avelizmu) into yadhav/fix-recent-issues.

What

Adds a repo-scoped fast path for suborg config resolution. When syncing a single repo (webhook events like repo.created), getSubOrgConfigs(repo) inspects only that repo's teams and custom properties instead of enumerating every repo of every suborg org-wide. This keeps API cost flat (at most one GET /repos/{owner}/{repo}/teams and one GET /repos/{owner}/{repo}/properties/values) regardless of how many suborgs/teams/properties are defined.

New in lib/settings.js: getSubOrgConfigsForRepo, repoMatchesProperties, getReposTeams, getRepoCustomPropertyValues, plus repo threading through loadConfigs/updateRepos/getSubOrgConfigs. Comprehensive unit tests added.

Conflict resolution

One conflict in updateRepos(): this branch's reevaluateOnChange preMatchedSuborgSources snapshot landed at the same spot as #1031's getSubOrgConfigs()getSubOrgConfigs(repo) change. Resolved by keeping both.

Compatibility notes

  • Octokit .rest.* calls align with this branch's probot 14.3.2 migration — no silent no-op risk.
  • Semantically compatible with the suborg re-evaluation feature: reloadSubOrgConfigs() stays on the org-wide path for post-apply refresh; the pre-apply snapshot uses the repo-scoped result correctly.

Testing

  • settings suite: 118/118 pass
  • full unit suite: 366 passed, 12 skipped, 0 failed

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

avelizmu and others added 5 commits July 15, 2026 14:54
Incorporate avelizmu's repo-scoped optimization for suborgproperties and
suborgteams so single-repo syncs inspect only that repo's teams/custom
properties instead of enumerating every repo of every suborg org-wide.

Conflict in updateRepos() resolved by keeping both the getSubOrgConfigs(repo)
argument and this branch's reevaluateOnChange preMatchedSuborgSources snapshot.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@decyjphr
decyjphr merged commit 67de936 into yadhav/fix-recent-issues Aug 20, 2026
2 checks passed
@decyjphr
decyjphr deleted the decyjphr-probable-dollop branch August 20, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants